package com.ruoyi.generateTest.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.generateTest.mapper.GeneratedExamMapper;
import com.ruoyi.generateTest.domain.GeneratedExam;
import com.ruoyi.generateTest.service.IGeneratedExamService;

/**
 * 生成试题Service业务层处理
 * 
 * @author 经纬线
 * @date 2024-08-04
 */
@Service
public class GeneratedExamServiceImpl implements IGeneratedExamService 
{
    @Autowired
    private GeneratedExamMapper generatedExamMapper;

    /**
     * 查询生成试题
     * 
     * @param examId 生成试题主键
     * @return 生成试题
     */
    @Override
    public GeneratedExam selectGeneratedExamByExamId(Long examId)
    {
        return generatedExamMapper.selectGeneratedExamByExamId(examId);
    }

    /**
     * 查询生成试题列表
     * 
     * @param generatedExam 生成试题
     * @return 生成试题
     */
    @Override
    public List<GeneratedExam> selectGeneratedExamList(GeneratedExam generatedExam)
    {
        return generatedExamMapper.selectGeneratedExamList(generatedExam);
    }

    /**
     * 新增生成试题
     * 
     * @param generatedExam 生成试题
     * @return 结果
     */
    @Override
    public int insertGeneratedExam(GeneratedExam generatedExam)
    {
        return generatedExamMapper.insertGeneratedExam(generatedExam);
    }

    /**
     * 修改生成试题
     * 
     * @param generatedExam 生成试题
     * @return 结果
     */
    @Override
    public int updateGeneratedExam(GeneratedExam generatedExam)
    {
        return generatedExamMapper.updateGeneratedExam(generatedExam);
    }

    /**
     * 批量删除生成试题
     * 
     * @param examIds 需要删除的生成试题主键
     * @return 结果
     */
    @Override
    public int deleteGeneratedExamByExamIds(Long[] examIds)
    {
        return generatedExamMapper.deleteGeneratedExamByExamIds(examIds);
    }

    /**
     * 删除生成试题信息
     * 
     * @param examId 生成试题主键
     * @return 结果
     */
    @Override
    public int deleteGeneratedExamByExamId(Long examId)
    {
        return generatedExamMapper.deleteGeneratedExamByExamId(examId);
    }
}
